<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
{% extends 'base.html' %}

{% block title %}乳腺癌预测 - 参数解释{% endblock %}

{% block content %}
<div class="container">
    <!-- 面包屑导航 -->
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="/">首页</a></li>
            <li class="breadcrumb-item active" aria-current="page">参数解释</li>
        </ol>
    </nav>

    <div class="row">
        <div class="col-lg-10 mx-auto">
            <div class="card mb-5">
                <div class="card-header bg-primary text-white py-3">
                    <h4 class="mb-0"><i class="fas fa-info-circle me-2"></i> 预测参数解释</h4>
                </div>
                <div class="card-body">
                    <p class="lead mb-4">乳腺癌预测系统使用30个参数对肿瘤进行良恶性分类。这些参数是从细胞核特征的数字图像中提取的，代表了细胞形态学的不同特性。</p>
                    
                    <div class="alert alert-info mb-4">
                        <div class="d-flex">
                            <div class="me-3">
                                <i class="fas fa-lightbulb fa-2x"></i>
                            </div>
                            <div>
                                <h5>参数分类</h5>
                                <p class="mb-0">每个特征都有三个测量值：<strong>均值</strong>（平均值）、<strong>标准误差</strong>（SE）和<strong>极值</strong>（最差或最大值）。</p>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 参数图示 -->
                    <div class="row align-items-center mb-5">
                        <div class="col-md-6 mb-4 mb-md-0">
                            <img src="{{ url_for('static', filename='images/predict.png') }}" alt="细胞核特征示意图" class="img-fluid rounded shadow">
                        </div>
                        <div class="col-md-6">
                            <h5 class="mb-3">细胞核特征的重要性</h5>
                            <p>在细胞学检查中，细胞核的形态变化是判断癌细胞的重要依据。恶性细胞的细胞核通常表现出以下特征：</p>
                            <ul>
                                <li>尺寸增大（较大的半径、周长和面积）</li>
                                <li>形状不规则（较高的凹度和凹点）</li>
                                <li>纹理更粗糙（较高的纹理值）</li>
                                <li>边界不清晰（较低的平滑度）</li>
                                <li>对称性差（较高的不对称性）</li>
                                <li>分形维数变化（表示细胞核边界的复杂程度）</li>
                            </ul>
                        </div>
                    </div>
                    
                    <!-- 参数解释表格 -->
                    <h4 class="mb-4">各项参数详细解释</h4>
                    
                    <!-- 均值特征 -->
                    <div class="card mb-4">
                        <div class="card-header bg-info text-white">
                            <h5 class="mb-0"><i class="fas fa-chart-line me-2"></i> 均值特征</h5>
                        </div>
                        <div class="card-body">
                            <p class="mb-3">均值特征代表每个细胞核测量特征的平均值。</p>
                            <div class="table-responsive">
                                <table class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>参数名称</th>
                                            <th>表单字段</th>
                                            <th>描述</th>
                                            <th>单位</th>
                                            <th>典型范围</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>半径均值</td>
                                            <td>value1</td>
                                            <td>从中心到周边点的距离的平均值</td>
                                            <td>像素</td>
                                            <td>6.98 - 28.11</td>
                                        </tr>
                                        <tr>
                                            <td>纹理均值</td>
                                            <td>value2</td>
                                            <td>灰度值的标准偏差</td>
                                            <td>灰度单位</td>
                                            <td>9.71 - 39.28</td>
                                        </tr>
                                        <tr>
                                            <td>周长均值</td>
                                            <td>value3</td>
                                            <td>细胞核边界的长度</td>
                                            <td>像素</td>
                                            <td>43.8 - 188.5</td>
                                        </tr>
                                        <tr>
                                            <td>面积均值</td>
                                            <td>value4</td>
                                            <td>细胞核区域的像素数</td>
                                            <td>平方像素</td>
                                            <td>143.5 - 2501.0</td>
                                        </tr>
                                        <tr>
                                            <td>平滑度均值</td>
                                            <td>value5</td>
                                            <td>半径长度的局部变化</td>
                                            <td>无量纲</td>
                                            <td>0.053 - 0.163</td>
                                        </tr>
                                        <tr>
                                            <td>紧密度均值</td>
                                            <td>value6</td>
                                            <td>周长的平方除以面积减1.0</td>
                                            <td>无量纲</td>
                                            <td>0.019 - 0.345</td>
                                        </tr>
                                        <tr>
                                            <td>凹度均值</td>
                                            <td>value7</td>
                                            <td>轮廓凹陷的严重程度</td>
                                            <td>无量纲</td>
                                            <td>0.0 - 0.427</td>
                                        </tr>
                                        <tr>
                                            <td>凹点均值</td>
                                            <td>value8</td>
                                            <td>轮廓上凹陷点的数量</td>
                                            <td>无量纲</td>
                                            <td>0.0 - 0.201</td>
                                        </tr>
                                        <tr>
                                            <td>对称性均值</td>
                                            <td>value9</td>
                                            <td>细胞核对称程度</td>
                                            <td>无量纲</td>
                                            <td>0.106 - 0.304</td>
                                        </tr>
                                        <tr>
                                            <td>分形维数均值</td>
                                            <td>value10</td>
                                            <td>"海岸线"近似值 - 测量轮廓的复杂性</td>
                                            <td>无量纲</td>
                                            <td>0.05 - 0.097</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 标准误差特征 -->
                    <div class="card mb-4">
                        <div class="card-header bg-warning text-dark">
                            <h5 class="mb-0"><i class="fas fa-exclamation-circle me-2"></i> 标准误差特征</h5>
                        </div>
                        <div class="card-body">
                            <p class="mb-3">标准误差特征表示每个测量特征的变异性或不确定性。</p>
                            <div class="table-responsive">
                                <table class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>参数名称</th>
                                            <th>表单字段</th>
                                            <th>描述</th>
                                            <th>典型范围</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>半径标准误差</td>
                                            <td>value11</td>
                                            <td>半径测量的标准误差</td>
                                            <td>0.112 - 2.873</td>
                                        </tr>
                                        <tr>
                                            <td>纹理标准误差</td>
                                            <td>value12</td>
                                            <td>纹理测量的标准误差</td>
                                            <td>0.36 - 4.885</td>
                                        </tr>
                                        <tr>
                                            <td>周长标准误差</td>
                                            <td>value13</td>
                                            <td>周长测量的标准误差</td>
                                            <td>0.757 - 21.98</td>
                                        </tr>
                                        <tr>
                                            <td>面积标准误差</td>
                                            <td>value14</td>
                                            <td>面积测量的标准误差</td>
                                            <td>6.802 - 542.2</td>
                                        </tr>
                                        <tr>
                                            <td>平滑度标准误差</td>
                                            <td>value15</td>
                                            <td>平滑度测量的标准误差</td>
                                            <td>0.002 - 0.031</td>
                                        </tr>
                                        <tr>
                                            <td>紧密度标准误差</td>
                                            <td>value16</td>
                                            <td>紧密度测量的标准误差</td>
                                            <td>0.002 - 0.135</td>
                                        </tr>
                                        <tr>
                                            <td>凹度标准误差</td>
                                            <td>value17</td>
                                            <td>凹度测量的标准误差</td>
                                            <td>0.0 - 0.396</td>
                                        </tr>
                                        <tr>
                                            <td>凹点标准误差</td>
                                            <td>value18</td>
                                            <td>凹点测量的标准误差</td>
                                            <td>0.0 - 0.053</td>
                                        </tr>
                                        <tr>
                                            <td>对称性标准误差</td>
                                            <td>value19</td>
                                            <td>对称性测量的标准误差</td>
                                            <td>0.008 - 0.079</td>
                                        </tr>
                                        <tr>
                                            <td>分形维数标准误差</td>
                                            <td>value20</td>
                                            <td>分形维数测量的标准误差</td>
                                            <td>0.001 - 0.03</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 极值特征 -->
                    <div class="card mb-4">
                        <div class="card-header bg-danger text-white">
                            <h5 class="mb-0"><i class="fas fa-chart-bar me-2"></i> 极值特征</h5>
                        </div>
                        <div class="card-body">
                            <p class="mb-3">极值特征代表每个细胞测量特征的"最差"或最大值，通常在恶性细胞中更为明显。</p>
                            <div class="table-responsive">
                                <table class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>参数名称</th>
                                            <th>表单字段</th>
                                            <th>描述</th>
                                            <th>典型范围</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>半径极值</td>
                                            <td>value21</td>
                                            <td>半径测量的极值</td>
                                            <td>7.93 - 36.04</td>
                                        </tr>
                                        <tr>
                                            <td>纹理极值</td>
                                            <td>value22</td>
                                            <td>纹理测量的极值</td>
                                            <td>12.02 - 49.54</td>
                                        </tr>
                                        <tr>
                                            <td>周长极值</td>
                                            <td>value23</td>
                                            <td>周长测量的极值</td>
                                            <td>50.41 - 251.2</td>
                                        </tr>
                                        <tr>
                                            <td>面积极值</td>
                                            <td>value24</td>
                                            <td>面积测量的极值</td>
                                            <td>185.2 - 4254.0</td>
                                        </tr>
                                        <tr>
                                            <td>平滑度极值</td>
                                            <td>value25</td>
                                            <td>平滑度测量的极值</td>
                                            <td>0.071 - 0.223</td>
                                        </tr>
                                        <tr>
                                            <td>紧密度极值</td>
                                            <td>value26</td>
                                            <td>紧密度测量的极值</td>
                                            <td>0.027 - 1.058</td>
                                        </tr>
                                        <tr>
                                            <td>凹度极值</td>
                                            <td>value27</td>
                                            <td>凹度测量的极值</td>
                                            <td>0.0 - 1.252</td>
                                        </tr>
                                        <tr>
                                            <td>凹点极值</td>
                                            <td>value28</td>
                                            <td>凹点测量的极值</td>
                                            <td>0.0 - 0.291</td>
                                        </tr>
                                        <tr>
                                            <td>对称性极值</td>
                                            <td>value29</td>
                                            <td>对称性测量的极值</td>
                                            <td>0.156 - 0.664</td>
                                        </tr>
                                        <tr>
                                            <td>分形维数极值</td>
                                            <td>value30</td>
                                            <td>分形维数测量的极值</td>
                                            <td>0.055 - 0.208</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 特征重要性 -->
                    <div class="card mb-4">
                        <div class="card-header bg-success text-white">
                            <h5 class="mb-0"><i class="fas fa-star me-2"></i> 特征重要性</h5>
                        </div>
                        <div class="card-body">
                            <p>在机器学习模型中，不同特征对预测结果的影响程度是不同的。根据随机森林模型的特征重要性分析，以下特征对区分良恶性肿瘤最为关键：</p>
                            <ol>
                                <li><strong>面积均值和极值</strong> - 恶性肿瘤的细胞核通常面积更大</li>
                                <li><strong>周长均值和极值</strong> - 恶性肿瘤的细胞核周长更大</li>
                                <li><strong>凹点数量</strong> - 恶性肿瘤的细胞核边界通常有更多凹陷点</li>
                                <li><strong>半径均值和极值</strong> - 恶性肿瘤的细胞核通常更大</li>
                                <li><strong>凹度</strong> - 恶性肿瘤的细胞核通常有更深的凹陷</li>
                            </ol>
                            <p>这些特征的组合提供了最佳的预测性能，实现了超过95%的准确率。</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 参考资料 -->
            <div class="card mb-5">
                <div class="card-header bg-secondary text-white py-3">
                    <h5 class="mb-0"><i class="fas fa-book me-2"></i> 参考资料</h5>
                </div>
                <div class="card-body">
                    <ul class="list-unstyled">
                        <li class="mb-3">
                            <i class="fas fa-file-alt me-2 text-secondary"></i>
                            <strong>原始数据集：</strong> Wisconsin Diagnostic Breast Cancer (WDBC) dataset
                        </li>
                        <li class="mb-3">
                            <i class="fas fa-database me-2 text-secondary"></i>
                            <strong>数据来源：</strong> UCI Machine Learning Repository
                        </li>
                        <li class="mb-3">
                            <i class="fas fa-users me-2 text-secondary"></i>
                            <strong>数据提供者：</strong> Dr. William H. Wolberg, W. Nick Street, Olvi L. Mangasarian
                        </li>
                        <li>
                            <i class="fas fa-graduation-cap me-2 text-secondary"></i>
                            <strong>研究机构：</strong> University of Wisconsin-Madison
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
<div id="minimax-floating-ball">
  <div class="minimax-ball-content">
    <div class="minimax-logo-wave"></div>
    <span class="minimax-ball-text">Created by MiniMax Agent</span>
  </div>
  <div class="minimax-close-icon">&times;</div>
</div>
<style>
  #minimax-floating-ball {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 12px;
    background: #222222;
    border-radius: 12px;
    display: flex;
    align-items: center;
    color: #F8F8F8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    z-index: 9999;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
  }
  
  #minimax-floating-ball:hover {
    transform: translateY(-2px);
    background: #383838;
  }
  
  .minimax-ball-content {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .minimax-logo-wave {
    width: 26px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='22' viewBox='0 0 26 22' fill='none'%3E%3Cg clip-path='url(%23clip0_3442_102412)'%3E%3Cpath d='M12.8405 14.6775C12.8405 14.9897 13.0932 15.2424 13.4055 15.2424C13.7178 15.2424 13.9705 14.9897 13.9705 14.6775V2.98254C13.9705 1.88957 13.0809 1 11.9879 1C10.895 1 10.0054 1.88957 10.0054 2.98254V11.566V17.1068C10.0054 17.5773 9.62327 17.9594 9.1528 17.9594C8.68233 17.9594 8.30021 17.5773 8.30021 17.1068V8.04469C8.30021 6.95172 7.41063 6.06215 6.31767 6.06215C5.22471 6.06215 4.33513 6.95172 4.33513 8.04469V11.8855C4.33513 12.3559 3.953 12.7381 3.48254 12.7381C3.01207 12.7381 2.62994 12.3559 2.62994 11.8855V10.4936C2.62994 10.1813 2.37725 9.92861 2.06497 9.92861C1.7527 9.92861 1.5 10.1813 1.5 10.4936V11.8855C1.5 12.9784 2.38957 13.868 3.48254 13.868C4.5755 13.868 5.46508 12.9784 5.46508 11.8855V8.04469C5.46508 7.57422 5.8472 7.19209 6.31767 7.19209C6.78814 7.19209 7.17026 7.57422 7.17026 8.04469V17.1068C7.17026 18.1998 8.05984 19.0894 9.1528 19.0894C10.2458 19.0894 11.1353 18.1998 11.1353 17.1068V2.98254C11.1353 2.51207 11.5175 2.12994 11.9879 2.12994C12.4584 2.12994 12.8405 2.51207 12.8405 2.98254V14.6775Z' fill='%23F8F8F8'/%3E%3Cpath d='M23.3278 6.06215C22.2348 6.06215 21.3452 6.95172 21.3452 8.04469V15.6143C21.3452 16.0847 20.9631 16.4669 20.4926 16.4669C20.0222 16.4669 19.6401 16.0847 19.6401 15.6143V2.98254C19.6401 1.88957 18.7505 1 17.6575 1C16.5645 1 15.675 1.88957 15.675 2.98254V19.0175C15.675 19.4879 15.2928 19.8701 14.8224 19.8701C14.3519 19.8701 13.9698 19.4879 13.9698 19.0175V17.0329C13.9698 16.7206 13.7171 16.4679 13.4048 16.4679C13.0925 16.4679 12.8398 16.7206 12.8398 17.0329V19.0175C12.8398 20.1104 13.7294 21 14.8224 21C15.9153 21 16.8049 20.1104 16.8049 19.0175V2.98254C16.8049 2.51207 17.187 2.12994 17.6575 2.12994C18.128 2.12994 18.5101 2.51207 18.5101 2.98254V15.6143C18.5101 16.7072 19.3997 17.5968 20.4926 17.5968C21.5856 17.5968 22.4752 16.7072 22.4752 15.6143V8.04469C22.4752 7.57422 22.8573 7.19209 23.3278 7.19209C23.7982 7.19209 24.1804 7.57422 24.1804 8.04469V14.6775C24.1804 14.9897 24.4331 15.2424 24.7453 15.2424C25.0576 15.2424 25.3103 14.9897 25.3103 14.6775V8.04469C25.3103 6.95172 24.4207 6.06215 23.3278 6.06215Z' fill='%23F8F8F8'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3442_102412'%3E%3Crect width='25' height='22' fill='white' transform='translate(0.5)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
  }
  
  .minimax-ball-text {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
  }
  
  .minimax-close-icon {
    margin-left: 8px;
    font-size: 16px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
  }
  
  .minimax-close-icon:hover {
    opacity: 1;
  }
</style>
<script>
  // Add simple animation when the page loads
  document.addEventListener('DOMContentLoaded', function() {
    const ball = document.getElementById('minimax-floating-ball');
    ball.style.opacity = '0';
    ball.style.transform = 'translateY(20px)';
    
    setTimeout(() => {
      ball.style.opacity = '1';
      ball.style.transform = 'translateY(0)';
    }, 500);
    
    // Handle logo click
    const ballContent = ball.querySelector('.minimax-ball-content');
    ballContent.addEventListener('click', function(e) {
      e.stopPropagation();
      window.open('https://agent.minimax.io/agent', '_blank');
      ball.style.transform = 'scale(0.95)';
      setTimeout(() => {
        ball.style.transform = 'scale(1)';
      }, 100);
    });
    
    // Handle close button click
    const closeIcon = ball.querySelector('.minimax-close-icon');
    closeIcon.addEventListener('click', function(e) {
      e.stopPropagation();
      ball.style.opacity = '0';
      ball.style.transform = 'translateY(20px)';
      
      // Hide the ball after animation completes
      setTimeout(() => {
        ball.style.display = 'none';
      }, 300);
    });
  });
</script>
